/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ihc.terminalbanco.gui.panels;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.GridLayout;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;

/**
 *
 * @author rhsilva
 */
public class SaldoPane extends JPanel implements RotulosInterface{
    
    public static Font fonte = ConstructMenusPanels.fonte;

    public SaldoPane(ActionListener actionListiner) {

        this.setLayout(new BorderLayout());

        JPanel painelSaldo = new JPanel();
        painelSaldo.setLayout(new GridLayout(5, 2 ,50,25));

        JLabel imprimeSaldo = new JLabel("Imprime[Enter] ");
        imprimeSaldo.setFont(fonte);
        painelSaldo.add(imprimeSaldo);

        JLabel nadaSaldo = new JLabel("");
        nadaSaldo.setFont(fonte);
        nadaSaldo.setVisible(false);
        painelSaldo.add(nadaSaldo);

        JLabel labelSaldo = new JLabel("SLD LIVRE ");
        labelSaldo.setFont(fonte);
        painelSaldo.add(labelSaldo);
        
        JLabel saldoField = new JLabel("500,00");
        saldoField.setFont(fonte);
        //saldoField.setEditable(false);
        painelSaldo.add(saldoField);

        JLabel bloqueado24Saldo = new JLabel("(+)BLQ 24 HS");
        bloqueado24Saldo.setFont(fonte);
        painelSaldo.add(bloqueado24Saldo);

        JLabel bloqueado24Field = new JLabel("0,00");
        bloqueado24Field.setFont(fonte);
        //bloqueado24Field.setEditable(false);
        painelSaldo.add(bloqueado24Field);

        JLabel bloqueadoPorMais24Saldo = new JLabel("(+)BLQ + 24 HS");
        bloqueadoPorMais24Saldo.setFont(fonte);
        painelSaldo.add(bloqueadoPorMais24Saldo);

        JLabel bloqueadoPorMais24Field = new JLabel("0,00");
        bloqueadoPorMais24Field.setFont(fonte);
        painelSaldo.add(bloqueadoPorMais24Field);

        JLabel limiteSaldo = new JLabel("Limite");
        limiteSaldo.setFont(fonte);
        painelSaldo.add(limiteSaldo);

        JLabel limiteField = new JLabel("0,00");
        limiteField.setFont(fonte);
        painelSaldo.add(limiteField);

        JPanel painelCentral = new JPanel();
        painelCentral.setLayout(new BorderLayout());

        painelCentral.add(painelSaldo, BorderLayout.CENTER);
        JPanel painelLeste = new JPanel(), painelOeste = new JPanel(),
               painelNorteInterno = new JPanel();
        painelLeste.setPreferredSize(new Dimension(150,100));
        painelOeste.setPreferredSize(new Dimension(150,100));
        painelNorteInterno.setPreferredSize(new Dimension(100,100));

        painelCentral.add(painelLeste, BorderLayout.EAST);
        painelCentral.add(painelOeste, BorderLayout.WEST);
        painelCentral.add(painelNorteInterno, BorderLayout.NORTH);

        JPanel painelSul = new JPanel();
        painelSul.setLayout(new GridLayout(1, 1,100,0));

        JButton voltarButton = new JButton("Voltar");
        voltarButton.setFont(fonte);
        voltarButton.setVisible(false);
        voltarButton.addActionListener(actionListiner);
        painelSul.add(voltarButton);
        
        JButton confirmarButton = new JButton(confirmarString);
        confirmarButton.setFont(fonte);
        confirmarButton.setVisible(true);
        confirmarButton.addActionListener(actionListiner);
        painelSul.add(confirmarButton);

        painelSul.setPreferredSize(new Dimension(480, 100));
        this.add(painelCentral, BorderLayout.NORTH );
        this.add(painelSul, BorderLayout.SOUTH);
      //  System.out.println("Executando!");
    }

}
